// 非point free 模式
function fn1(val) {
  return val.toLowerCase().replace(/\s+/g, '_')
}

console.log('非point free:', fn1('Hello   World'))


// point free
const fp = require('lodash/fp')

const fn2 = fp.flowRight(fp.replace(/\s+/g, '_'), fp.toLower)

console.log('point free:', fn2('Hello   World'))